// index.js


Page({
  // 页面初始数据
  data: {
    info: 'hello world',
    imgSrc: 'https://tse3-mm.cn.bing.net/th/id/OIP-C._c9kmaXjCYDK19E1FT5i6QHaGL?pid=ImgDet&rs=1',
    Num:4,
    count:10,
    msg:'你好',
    type:1,
    arr1:['苹果','华为','小米']
    ,
    userList:[{id:1,name:'小黄'},{id:1,name:'小绿'},{id:1,name:'小蓝'}]
  },
  //绑定事件
  btnHandler(e){
    console.log(e);
    this.setData({Num:this.data.Num=10})
  },
  btnHandler2(e){
    this.setData({count:this.data.count+=e.target.dataset.info})
  },
  inputHandler(e){
    console.log(e.detail.value);
  },
  inputHandler2(e){
    this.setData({
      msg:e.detail.value
    })
  }

})